package com.quartz.service;

import com.quartz.dao.AccountDao;
import com.quartz.entity.Account;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * Created with IntelliJ IDEA.
 * User: lixiao
 * Created Date: 2020/7/31 15:23
 */
@Service
public class AccountService {
    @Autowired
    AccountDao accountDao;

    public Account findAccount(int id) {
        return accountDao.queryByid(id);
    }

    public String addAccount(Account account){
        accountDao.add(account);
        return account.getId();
    }

}